package game.platformer.levels;

import game.platformer.platformer;
import org.anddev.andengine.opengl.texture.Texture;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.region.TextureRegion;
import org.anddev.andengine.opengl.texture.region.TextureRegionFactory;
/**
 *
 * @author sOaF
 */
public class elementsTextureSet implements levelTexturePackage{
	//var block-------------------
	private Texture platformsT;
	private Texture backgroundT;
        
	private TextureRegion backgroundTR;
  	private TextureRegion elementsMainPlatformTR;
	
	public void loadTextures(platformer game){
		//create textures, then attach textureRegions (.png)
		platformsT = new Texture(256, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
		elementsMainPlatformTR = TextureRegionFactory.createFromAsset(platformsT, game, "elements/elementsMainPlatform.png", 0, 0);
	
		
                //background texture
		backgroundT = new Texture(1024, 512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
		backgroundTR = TextureRegionFactory.createFromAsset(backgroundT, game, "elements/elementsBG.png", 0, 0);

		//load textures
		game.getEngine().getTextureManager().loadTextures(backgroundT, platformsT);
	}
	//getters---------------------
	public TextureRegion getElementsMainPlatform(){ return elementsMainPlatformTR;}
	
	public TextureRegion getBackground(){ return backgroundTR;}
}
